package com.xnyzc.lhy.mis.controller.cmsapi.auditentry;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.mis.entity.result.cms.auditentry.AuditEntry;
import com.xnyzc.lhy.mis.service.cms.auditentry.OaSysAuditEntryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author zhaolijie
 * @date
 */
@RestController
@RequestMapping(value = "/cms/oaSysAuditEntry")
public class OaSysAuditEntryController {

    @Autowired
    private OaSysAuditEntryService oaSysAuditEntryService;

    @PostMapping(value = "/getAuditEntryList")
    public Rv getAuditEntryList(@RequestBody AuditEntry auditEntryResults) {
        return oaSysAuditEntryService.getAuditEntryList(auditEntryResults);
    }

    /**
     * 获取字典审核状态信息
     *
     * @return
     */
    @GetMapping(value = "/getDictAuditStatus")
    public Rv getDictAuditStatus() {
        return oaSysAuditEntryService.getDictAuditStatus();
    }


    /**
     * 获取列表Item的详情信息
     * @param auditId:主键ID
     * @return
     */
    @GetMapping(value = "/getAuditEntryListDetails")
    public Rv getAuditEntryListDetails(String auditId) {
        return oaSysAuditEntryService.getAuditEntryListDetails(auditId);
    }

    /***
     * 处理审核意见
     * @param auditEntryResults
     * @return
     */
    @PostMapping(value = "/handlerAuditEntryRemark")
    public Rv handlerAuditEntryRemark(@RequestBody AuditEntry auditEntryResults) {
        return oaSysAuditEntryService.handlerAuditEntryRemark(auditEntryResults);
    }

    /***
     * 处理审核意见
     * @param auditEntryResults
     * @return
     */
    @PostMapping(value = "/exportAuditEntryInfo")
    public Rv exportAuditEntryInfo(@RequestBody AuditEntry auditEntryResults) {
        return oaSysAuditEntryService.exportAuditEntryInfo(auditEntryResults);
    }



}
